package com.nononsenseapps.feeder.ui.feed

import android.view.View
import com.nononsenseapps.feeder.ui.R
import com.nononsenseapps.feeder.ui.common.MultiImageView

class FeedItemHolder_MultiImage(view: View, actionCallback: ActionCallback,viewModel:Boolean) :
        AbstractFeedItemHolder(view,actionCallback,viewModel){

    val imageView = view.findViewById<View>(R.id.story_image) as  MultiImageView<String>

    init{
        imageView.setOnItemImageClickListener { context, view, index, list ->
            if(imageView.isMoreImageViewClick(index)){
                actionCallback.showImagePreview(index,list,view)
            }else
                onClick(imageView)
        }
        imageView.setOnItemImageLoadListener { context, imageView, index, list ->
            loadImage(context,imageView, list[index],false)
        }
    }

}